Xbasic

OBJECT.BASEQUERYRUN Function

Syntax

.Basequeryrun([c filter_expression [,c order_expression [,l displaywarning [,c tablename ]]]])

Arguments

filter_expression

Optional. Default = "" (all records). A character filter expression that evaluates to a logical value. Selects records from the form's primary table.

order_expression

Optional. Default = "" (record number order). A character order expression that sorts selected records.

displaywarning

Optional. Default = .F. (FALSE)

.T. = Display a warning message if the filter expression returns no records.
.F. = Do not display warning message.
tablename

Optional. Default = "". The name of the table.

Description

Sets the base filter and order expressions for a layout.

The <OBJECT>.BASEQUERYRUN() method applies to:

Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)

The <OBJECT>.BASEQUERYRUN() method sets the base filter and order expressions for a layout.

Example

dim ptr as P
ptr = form.load("Customer Information")
ptr.BaseQueryRun("lastname > 'B'", "lastname + firstname", .t., "customer")

The following code removes the layout's base filter and order expressions.

dim ptr as P
ptr = form.load("Customer Information")
ptr.BaseQueryRun("", "")

Limitations

Desktop applications only.

See Also